<template>
	<view class="flex-col page">
		<view class="flex-col group">
			<view class="flex-col">
				<text class="text_1">{{item.materialName}}</text>
				<view class="flex-row section_1">
					<view class="flex-col items-start group_2">
						<text class="text_2">最晚下单时间</text>
						<text class="text_3">现场测量时间</text>
						<text class="text_4">进场安装时间</text>
						<text class="text_5">订购周期参考</text>
						<text class="text_6">注意事项(备注）</text>
					</view>
					<view class="section_2">
						<!--*-->
					</view>
					<view class="flex-col group_3">
						<view class="flex-col">
							<view class="flex-row">
								<view class="flex-col items-start group_6">
									<text class="text_7">{{item.singleTimeName}}</text>
									<text class="text_8">{{item.measureTimeName}}</text>
									<text class="text_9">{{item.installTimeName}}</text>
								</view>
								<view class="section_3">
									<!--*-->
								</view>
								<view class="flex-col group_7">
									<!-- 1 -->
									<view class="justify-center u-col-center">
										<text class="text_11">
											<uni-datetime-picker type="date" v-model="item.singleTime">
												{{item.singleTime}}
											</uni-datetime-picker>
										</text>
										<image :src="imgUrl+'16557838861113221762.png'" class="image_1 image_2" />
									</view>
									<!-- 2 -->
									<view class="flex-col group_8">
										<view class="justify-center u-col-center">
											<text class="text_11">
												<uni-datetime-picker type="date" v-model="item.measureTime">
													{{item.measureTime}}
												</uni-datetime-picker>
											</text>
											<image :src="imgUrl+'16557838861113221762.png'" class="image_1 image_2" />
										</view>
										<!-- 3 -->
										<view class="flex-row group_10 u-col-center">
											<text class="text_12">
												<uni-datetime-picker :start="timer" type="date"
													v-model="item.installTime">
													{{item.installTime}}
												</uni-datetime-picker>
											</text>
											<image :src="imgUrl+'16557838861113221762.png'"
												class="image_1 image_2 center" />
										</view>
									</view>
								</view>
							</view>
							<text class="text_13"> <input type="text" style="font-size: 12px;"
									placeholder-style="font-size:12px" placeholder="请输入周期参考"
									v-model="item.cycle"></text>
						</view>
						<text class="text_14"><input type="text" style="font-size: 12px;"
								placeholder-style="font-size:12px" placeholder="请输入备注事项" v-model="item.remarks"></text>
					</view>
				</view>
			</view>
			<view class="flex-col items-center button" @click="submit"><text class="text_15">保存</text></view>
		</view>

	</view>
</template>

<script>
	export default {
		components: {},
		async onLoad(option) {

			await this.mymaterial(option.mobilizationId);

		},
		data() {
			return {
				imgUrl: this.$IMG_URL,
				index: 0,
				item: {},
				show: false,
				current: 0,
				value1: 0,
				item: {},
				timer: Date.now() //获取当前时间
			};
		},
		methods: {
			mymaterial(id) {
				this.$http('check.mobilizationId', {
					mobilizationId: id
				}).then(r => {
					if (r.code == 200) {
						this.item = r.data
					}

				});
			},
			submit() {

				this.$http('check.updatematerial', this.item).then(r => {
					console.log(r);
					if (r.code == 200) {
						uni.navigateBack({
							delta: 1
						})
					}
				});



			},

			maskClick(e) {
				console.log('----maskClick事件:', e);
			}
		},
	};
</script>

<style scoped lang="scss">
	.image_2 {
		margin-left: 12rpx;

	}

	.center {
		margin-left: 13rpx;
	}

	.image_1 {
		width: 12rpx;
		height: 20rpx;
	}

	.page {
		background-color: #ffffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
	}

	.group {
		padding: 29rpx 32rpx 48rpx;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.button {
		margin-top: 533rpx;
		// padding: 19rpx 0 31rpx;
		height: 88rpx;
		background-color: #1d6aff;
		border-radius: 44rpx;
	}

	.text_1 {
		align-self: flex-start;
		color: #1d6aff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.section_1 {
		margin-top: 34rpx;
		padding-left: 32rpx;
		padding-right: 17rpx;
		background-image: url('https://project-user-resource-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b14c62d02982001153329a/16557868671170033768.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.text_15 {
		color: #ffffff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		display: flex;
		height: 100%;
		width: 100%;
		align-items: center;
		justify-content: center;
	}

	.group_2 {
		margin-top: 25rpx;
		flex-shrink: 0;
	}

	.section_2 {
		margin-left: 33rpx;
		flex-shrink: 0;
		background-color: #d9d9d9;
		width: 1rpx;
		height: 436rpx;
	}

	.group_3 {
		margin-left: 32rpx;
		flex: 1 1 auto;
	}

	.text_2 {
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_3 {
		margin-top: 59rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_4 {
		margin-top: 59rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_5 {
		margin-top: 59rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_6 {
		margin-top: 42rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_14 {
		margin-top: 56rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_13 {
		margin-top: 24rpx;
		align-self: center;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.group_6 {
		margin-top: 25rpx;
		flex-shrink: 0;
	}

	.section_3 {
		margin-left: 24rpx;
		flex-shrink: 0;
		background-color: #d9d9d9;
		width: 1rpx;
		height: 262rpx;
	}

	.group_7 {
		display: flex;
		width: 100%;
		align-items: center;
		margin-left: -105rpx;
		// margin-right: 4rpx;
		// flex: 1 1 auto;
		justify-content: center;
	}

	.text_7 {
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_8 {
		margin-top: 59rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_9 {
		margin-top: 59rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.text_10 {
		align-self: flex-start;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.group_8 {
		margin-top: 59rpx;
	}

	.group_10 {
		margin-top: 50rpx;
	}

	.text_11 {

		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}



	.text_12 {
		/* margin-bottom: 9rpx; */
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';

	}

	.image_3 {
		margin-left: 11rpx;
		margin-top: 11rpx;
		flex-shrink: 0;
	}
</style>
